<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <script>        

        var num = prompt("请输入数字")

        if(num % 2 === 0){

            alert("偶数")

        }else{

            alert("奇数")

        }

    </script>

</head>

<body>

    

</body>

</html>

